package com.zc.app.bean;

import javafx.beans.property.*;
import org.omg.CORBA.PUBLIC_MEMBER;

/**
 * Created by User on 2017/5/11.
 */
public class Book {

    private StringProperty title = new SimpleStringProperty(this, "title", "Unknow");
    private DoubleProperty price = new SimpleDoubleProperty(this, "price", 0.0);
    private ReadOnlyStringWrapper ISBN = new ReadOnlyStringWrapper(this, "ISBN", "Unknow");

    public Book() {
    }

    public Book(String title, double price, String ISBN){
        this.title.set(title);
        this.price.set(price);
        this.ISBN.set(ISBN);
    }

    public final void setPrice(double price){
        this.price.set(price);
    }

    public final DoubleProperty priceProperty(){
        return price;
    }


    public final String getISBN(){
        return ISBN.get();
    }

    public final ReadOnlyStringProperty ISBNProperty(){
        return ISBN.getReadOnlyProperty();
    }

    public final StringProperty titleProperty(){
        return title;
    }

    public final String getTitle(){
        return title.get();
    }

    public final void setTitle(String title){
        this.title.set(title);
    }
}
